package com.heima.wemedia.service;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.WmMaterialDTO;
import com.heima.model.wemedia.pojos.WmMaterial;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author stone
 * @description 针对表【wm_material(自媒体图文素材信息表)】的数据库操作Service
 * @createDate 2023-03-21 16:38:58
 */
public interface WmMaterialService extends IService<WmMaterial> {


    /**
     * 上传素材
     *
     * @param multipartFile
     * @return
     */
    ResponseResult uploadPicture(MultipartFile multipartFile);

    /**
     * 查询素材列表
     *
     * @param dto
     * @return
     */
    ResponseResult findList(WmMaterialDTO dto);

    /**
     * 根据ID删除素材
     *
     * @param id
     * @return
     */
    ResponseResult delPicture(Integer id);

    /**
     * 取消收藏与收藏素材
     *
     * @param id
     * @param cancelCollectMaterial
     * @return
     */
    ResponseResult updateStatus(Integer id, Short cancelCollectMaterial);
}
